package com.neusoft.my12306.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.neusoft.my12306.common.res.CommonResult;
import com.neusoft.my12306.entity.Passenger;
import com.neusoft.my12306.entity.Station;
import com.neusoft.my12306.mapper.PassengerMapper;
import com.neusoft.my12306.service.IPassengerService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 葛彬
 * @since 2023-07-21
 */
@Service
public class PassengerServiceImpl extends ServiceImpl<PassengerMapper, Passenger> implements IPassengerService {


    @Override
    public CommonResult queryPassenger(String userid) {
        QueryWrapper queryWrapper = new QueryWrapper();
        queryWrapper.eq("userid", userid);


        List<Passenger> lss = baseMapper.selectList(queryWrapper);
        CommonResult result = new CommonResult(lss);

        return result;
    }
}
